package com.blog.wu.myblog.util;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author wuyanshen
 * @Date 2018-10-18 下午4:29
 * @Discription 自定义属性配置
 */
@Component
public class WebPropertiesConfig {


    public static boolean sameAccountMultiLogin;

    public static String uploadUrl;

    public static String pageSize;

    public static String navSize;

    public static String getNavSize() {
        return navSize;
    }

    @Value("${page.navSize}")
    public void setNavSize(String navSize) {
        WebPropertiesConfig.navSize = navSize;
    }

    public static boolean isSameAccountMultiLogin() {
        return sameAccountMultiLogin;
    }

    @Value("${login.sameAccountMultiLogin}")
    public void setSameAccountMultiLogin(boolean sameAccountMultiLogin) {
        WebPropertiesConfig.sameAccountMultiLogin = sameAccountMultiLogin;
    }

    public static String getUploadUrl() {
        return uploadUrl;
    }

    @Value("${upload.uploadUrl}")
    public void setUploadUrl(String uploadUrl) {
        WebPropertiesConfig.uploadUrl = uploadUrl;
    }

    public static String getPageSize() {
        return pageSize;
    }


    @Value("${page.pageSize}")
    public void setPageSize(String pageSize) {
        WebPropertiesConfig.pageSize = pageSize;
    }
}
